﻿/*********************************************************
 * copyright learnren.com 版权所有
 * 开发人员：minyuan
 * 创建时间：2013/5/3 23:55:30
 * 描述说明：
 * 
 * 更改历史：
 * 
 * *******************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Security;

namespace LEARNREN.COM.Entity
{
    public class TopUser : MembershipUser
    {
        #region 构造函数

        public TopUser(string providerName,
                        string name,
                        object providerUserKey,
                        string email,
                        string passwordQuestion,
                        string comment,
                        bool isApproved,
                        bool isLockedOut,
                        DateTime creationDate,
                        DateTime lastLoginDate,
                        DateTime lastActivityDate,
                        DateTime lastPasswordChangedDate,
                        DateTime lastLockoutDate,
                        string applicationName)
        {
            this._ProviderName = providerName;
            this._UserName = name;
            this._ProviderUserKey = providerUserKey;
            this._Email = email;
            this._PasswordQuestion = passwordQuestion;
            this._Comment = comment;
            this._IsApproved = isApproved;
            this._IsLockedOut = isLockedOut;
            this._CreationDate = creationDate;
            this._LastLoginDate = lastLoginDate;
            this._LastActivityDate = lastActivityDate;
            this._LastPasswordChangedDate = lastPasswordChangedDate;
            this._LastLockoutDate = lastLockoutDate;
            this._ApplicationName = applicationName;
        }

        #endregion 构造函数

        #region 属性

        private string _ApplicationName;

        public string ApplicationName
        {
            get { return _ApplicationName; }
        }

        private string _Password;

        public string Password
        {
            get { return _Password; }
            set { _Password = value; }
        }

        private string _PasswordQuestion;
        public override string PasswordQuestion
        {
            get
            {
                return _PasswordQuestion;
            }
        }

        private string _PasswordAnswer;

        public string PasswordAnswer
        {
            get { return _PasswordAnswer; }
            set { _PasswordAnswer = value; }
        }


        private string _UserName;

        public override string UserName
        {
            get { return _UserName; }
        }

        private bool _IsOnline;

        public override bool IsOnline
        {
            get { return _IsOnline; }
        }

        private bool _IsLockedOut;

        public override bool IsLockedOut
        {
            get { return _IsLockedOut; }
        }

        private DateTime _LastLockoutDate;

        public override DateTime LastLockoutDate
        {
            get { return _LastLockoutDate; }
        }


        private DateTime _LastPasswordChangedDate;
        public override DateTime LastPasswordChangedDate
        {
            get
            {
                return _LastPasswordChangedDate;
            }
        }

        private string _Comment;
        public override string Comment
        {
            get
            {
                return _Comment;
            }
            set
            {
                _Comment = value;
            }
        }

        private string _Email;
        public override string Email
        {
            get
            {
                return _Email;
            }
            set
            {
                _Email = value;
            }
        }

        private DateTime _CreationDate;
        public override DateTime CreationDate
        {
            get
            {
                return _CreationDate;
            }
        }

        private bool _IsApproved;
        public override bool IsApproved
        {
            get
            {
                return _IsApproved;
            }
            set
            {
                _IsApproved = value;
            }
        }

        private DateTime _LastActivityDate;
        public override DateTime LastActivityDate
        {
            get
            {
                return _LastActivityDate;
            }
            set
            {
                _LastActivityDate = value;
            }
        }

        private DateTime _LastLoginDate;
        public override DateTime LastLoginDate
        {
            get
            {
                return _LastLoginDate;
            }
            set
            {
                _LastLoginDate = value;
            }
        }

        private string _ProviderName;
        public override string ProviderName
        {
            get
            {
                return _ProviderName;
            }
        }

        private object _ProviderUserKey;
        public override object ProviderUserKey
        {
            get
            {
                return _ProviderUserKey;
            }
        }

        private int _FailedPasswordAttemptCount;

        public int FailedPasswordAttemptCount
        {
            get { return _FailedPasswordAttemptCount; }
            set { _FailedPasswordAttemptCount = value; }
        }

        private DateTime _FailedPasswordAttemptWindowStart;

        public DateTime FailedPasswordAttemptWindowStart
        {
            get { return _FailedPasswordAttemptWindowStart; }
            set { _FailedPasswordAttemptWindowStart = value; }
        }

        private int _FailedPasswordAnswerAttemptCount;

        public int FailedPasswordAnswerAttemptCount
        {
            get { return _FailedPasswordAnswerAttemptCount; }
            set { _FailedPasswordAnswerAttemptCount = value; }
        }

        private DateTime _FailedPasswordAnswerAttemptWindowStart;

        public DateTime FailedPasswordAnswerAttemptWindowStart
        {
            get { return _FailedPasswordAnswerAttemptWindowStart; }
            set { _FailedPasswordAnswerAttemptWindowStart = value; }
        }
        

        #endregion 属性

        #region 属性设置方法

        public void SetPasswordQuestion(string value)
        {
            _PasswordQuestion = value;
        }

        public void SetIsOnline(bool isOnline)
        {
            this._IsOnline = isOnline;
        }

        public void SetIsLockedOut(bool isLockedOut)
        {
            this._IsLockedOut = isLockedOut;
        }

        public void SetLastLockoutDate(DateTime lastLockoutDate)
        {
            this._LastLockoutDate = lastLockoutDate;
        }

        public void SetLastPasswordChangedDate(DateTime lastPasswordChangedDate)
        {
            this._LastPasswordChangedDate = lastPasswordChangedDate;
        }

        #endregion 属性设置方法

        #region 重写方法

        public override bool UnlockUser()
        {
            return base.UnlockUser();
        }

        #endregion 重写方法
    }
}
